/*
 * 作者:熊猫
 * 日期:2017 - 3 - 14 7 - 45 - 8
 *
 */

package net.lainiao.morethread.Chapter6.demo1;

import java.util.concurrent.ConcurrentLinkedDeque;

/**
 * Created by Administrator on 2017/3/14.
 */
public class AddTask implements Runnable {
    private ConcurrentLinkedDeque<String> list;

    public AddTask(ConcurrentLinkedDeque<String> list) {
        this.list = list;
    }

    @Override
    public void run() {
        String name=Thread.currentThread().getName();
        for (int i = 0; i < 10000; i++) {
            list.add("name"+i);
        }
    }
}
